--
-- Author: Your Name
-- Date: 2014-12-05 15:23:01
--
local ChatData = class("ChatData");




function ChatData:ctor()

	 PROPERTY(self,"totalList","TotalList")      -- 数据来源 1 服务器器推送  2 玩家发送信息（这个信息不会引起服务器推送）
	 PROPERTY(self,"worldList","WorldList") 
	 PROPERTY(self,"personList","PersonList") 
	 PROPERTY(self,"systemMessage","SystemMessage") 

	 PROPERTY(self,"chatterInfoList","chatterInfoList") -- 保存 申请 和 屏蔽状态

	 self.chatterInfoList = {}
	 self.maxMessageNum = 60
	 self.totalList = {}

	--local systr1 	= WordManager:getWord("ChatLayer_012")

	self.systemMessage = {}
	self.systemMessage.msg = nil


end


function ChatData:parseChatItem(data) 

	local chatItem = {}
	chatItem.src_uid = data:read_uint32()
	chatItem.src_nick = data:readStringBytes(data:read_uint16());
    chatItem.head_id = data:read_uint32()
	chatItem.msg = data:readStringBytes(data:read_uint16());




	return chatItem

end


-- function ChatData:parseChatterInfo(data) 

-- 	local chatInfo = {}
-- 	chatInfo.uid = data:read_uint32()
-- 	chatInfo.nick = data:readStringBytes(data:read_uint16());  --data:read_uint16() 返回nick长度
-- 	chatInfo.player_level = data:read_uint32()


-- 	chatInfo.equip_info = {}
-- 	chatInfo.equip_info  = DataSystem.equipData:parseEquipItem(data)

-- 	return chatInfo

-- end




return ChatData



